//
//  UIProgressViewDemo.swift
//  firstProject
//
//  Created by 张彦辉 on 2017/3/27.
//  Copyright © 2017年 张彦辉. All rights reserved.
//

import UIKit
import SnapKit

class UIProgressViewDemo: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.gray
        let progress:UIProgressView = UIProgressView()
        //设置进度条样式
        progress.progressViewStyle = UIProgressViewStyle.default
        //设置当前进度
        progress.progress = 0.5
        //设置走过的进度样式
        progress.progressTintColor = UIColor.red
        //设置没走过的进度样式
        progress.trackTintColor = UIColor.green
        self.view.addSubview(progress)
        progress.snp.makeConstraints { (maker) in
            maker.width.equalTo(280)
            maker.center.equalTo(self.view)
        }
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
